# @time     :2022/4/18
# @Author   :Simple
# @FileName :auto_get_driver
import os

from util.handle_yaml import read_yaml
from config import BASE_DIR
from jsonpath import jsonpath


def init_browser_info():
    """
    获取要测试的浏览器
    :return:
    """
    file_path = os.path.join(BASE_DIR, 'settings/base_driver.yaml')
    browser_dict = read_yaml(file_path)
    return jsonpath(browser_dict, '$.browser.name')[0]


